﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BLO.Notification
{
    public class Notification
    {
        DTO.News info;
        DAO.News newsDAO;

        static int[] NotificationType;

        /// <summary>
        /// Static Constructor.
        /// </summary>
        static Notification()
        {
            NotificationType = new int[2];
            NotificationType[0] = (int)InfoType.RequestFriend;
            NotificationType[1] = (int)InfoType.Comment;
        }

        /// <summary>
        /// Constructor.
        /// </summary>
        public Notification()
        {
            newsDAO = new DAO.News();
            info = new DTO.News();
        }

        /// <summary>
        /// Check whether this type is type of Notification or not.
        /// </summary>
        /// <param name="Type">Type to check.</param>
        /// <returns>If this type is type of Notification, return True. Else return false.</returns>
        public static Boolean IsNotificationType(InfoType Type)
        {
            return (Array.IndexOf(NotificationType, (int)Type) != -1);
        }

        /// <summary>
        /// Check whether this type is type of Notification or not.
        /// </summary>
        /// <param name="Type">Type to check.</param>
        /// <returns>If this type is type of Notification, return True. Else return false.</returns>
        public static Boolean IsNotificationType(int Type)
        {
            return (Array.IndexOf(NotificationType, Type) != -1);
        }

        public static Notification InitNotification()
        {
            return new Notification();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="UserID"></param>
        /// <returns></returns>
        public static List<Notification> GetNotification(int UserID)
        {
            List<Notification> noteBLOs = new List<Notification>();
            return noteBLOs;
        }
    }
}